#ifndef NREAPTFRUIT_H
#define NREAPTFRUIT_H
#include <QtWidgets>
#include "solar/trunk/NTableWidget.h"
#include "solar/trunk/NinsipidView.h"
#include "solar/trunk/NWidget.h"

class MessageFruitBox : public QMainWindow{

    Q_OBJECT

public:

    MessageFruitBox(QWidget *parent=nullptr);

    ~MessageFruitBox();

    void nw_view_clear()
    {
        NW_mediaTabWidget->clearContents();
    }

    NTableWidget * priview()
    {
        return NW_mediaTabWidget;
    }


    void d_background_config(int d_way, QVariant curtain){
        if (d_way == 0)
        {
            global_pwidget->doconfigur_pixmap(curtain);
        }
        else if (d_way == 1)
        {
            global_pwidget->update_pixmap(curtain.toSize());
        }
    }

    void nw_viewlayout_init(int row, QString name, QString artist, QString album, QPixmap cover);

protected:
    MOUSE_ATTRIBUTE MSEVKEY;

private:
    NTableWidget *NW_mediaTabWidget = new NTableWidget(this);
    Nwidget *global_pwidget = new Nwidget(this);
    NinsipidView *NW_Download = new NinsipidView(global_pwidget);
    NinsipidView *NW_Comeback = new NinsipidView(global_pwidget);
    NinsipidView *NW_Trylsten = new NinsipidView(global_pwidget);
    QVBoxLayout *global_vbox = new QVBoxLayout(global_pwidget);
    Nwidget *roof_win = new Nwidget(global_pwidget);
    QHBoxLayout *roof_hbox = new QHBoxLayout(roof_win);
    int win_radius = 5;
    QFont globalFont = QFont("KaiTi_GB2312", 14);
    QMap<QString, bool> impact_swtc;

    void paintEvent(QPaintEvent *event);

    void resizeEvent(QResizeEvent *event);

signals:
    void msev_dlcl();
    void msev_trcl();
    void msev_back();

};

#endif // NREAPTFRUIT_H
